//
//  NXTRemoteControllerAppDelegate.h
//  NXTRemoteController
//
//  Created by naceka on 31.01.12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Robot.h"
#import "Panel.h"
#import "Control.h"
#import "Track.h"
#import "SettingsUIViewController.h"

enum Mode {
	CONTROL, TRACK
};

@interface NXTRemoteControllerAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
	
	enum Mode mode;	//mode of program
	
	Panel * panel;		//sensor data panel
	Control	* control;	//view of control
	Track * track;		//view of track
	SettingsUIViewController * settings;	//viewcontroller of settings
	UISegmentedControl * modeChanger; //change program mode
	UIButton * settingsBtn;		//call settings
	UIButton * btStateBtn;		//image of bt state
	UILabel * deviceAddr;	//addr of connected device
	UIPopoverController * popover;	//popover for settings
	
	Robot * robot;	//robot =)			
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UISegmentedControl * modeChanger;
@property (nonatomic, retain) IBOutlet UIButton * settingsBtn;
@property (nonatomic, retain) IBOutlet UIButton	* btStateBtn;
@property (nonatomic, retain) IBOutlet UILabel * deviceAddr;

- (IBAction) switchViews:(id) sender;
- (IBAction) settingsPressed:(id) sender;

- (void) setWidgetsEnabled:(BOOL) state;

//NSNotificationCenter
- (void) deviceConnected;
- (void) deviceDisconnected;

@end
